<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.3.1.css" />
<link rel="stylesheet" type="text/css" href="css/login.css" />
	<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
	<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>
<title>Insert title here</title>
<script src="nu.js"></script>
</head>
<body>
 <section id="boardContentPage" data-role="page" data-add-back-btn="true" data-url="./showPageList.nu?group_type=${requestScope.brlist.bvo.category }&group_id=${requestScope.brlist.bvo.group_id }&pageNo=1"> 
      <header data-role="header" data-position="fixed">
      	 <a href="menu.nu" data-role="button" data-icon="home" class="ui-btn-right">Home</a>
         <center><img src="././img/title.png" height="50"></center>
      </header>
      <div class="content" data-role="content">
      <c:set value="${sessionScope.login.id }" var="sessionMemberId"></c:set>
      <c:set value="${requestScope.brlist.bvo.confirmedIdList}" var="confirmedIdList"></c:set>
         <p><font size="5.5" color="#5D5D5D">${requestScope.brlist.bvo.title }</font></p>
         <p><font size="2" color="#8C8C8C">작성자: </font>
         <c:choose>
					<c:when test="${requestScope.brlist.bvo.nick_name =='공부의 신'||requestScope.brlist.bvo.nick_name =='만수무강'||requestScope.brlist.bvo.nick_name =='금연종결자'||requestScope.brlist.bvo.nick_name =='돈으로 똥 닦는'||requestScope.brlist.bvo.nick_name =='인간문화재'}">
						<font color="#FF1F27" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='엘리트'||requestScope.brlist.bvo.nick_name =='병원 킬러'||requestScope.brlist.bvo.nick_name =='담배를 물리친'||requestScope.brlist.bvo.nick_name =='부르주아'||requestScope.brlist.bvo.nick_name =='손발이 닳아 없어진 이병'}">
						<font color="#30D9E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='전교 1등'||requestScope.brlist.bvo.nick_name =='몸짱'||requestScope.brlist.bvo.nick_name =='존경스러운 금연자'||requestScope.brlist.bvo.nick_name =='졸부'||requestScope.brlist.bvo.nick_name =='혼자서도 잘해요'}">
						<font color="#A3FF00" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='3등급'||requestScope.brlist.bvo.nick_name =='건강한'||requestScope.brlist.bvo.nick_name =='자랑스러운 금연자'||requestScope.brlist.bvo.nick_name =='근검절약하는'||requestScope.brlist.bvo.nick_name =='부지런한'}">
						<font color="#FCEE5C" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='초심자'}">
						<font color="#E6E6E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='노력해야할'||requestScope.brlist.bvo.nick_name =='느림보'||requestScope.brlist.bvo.nick_name =='더 줄여야할'||requestScope.brlist.bvo.nick_name =='하층민'||requestScope.brlist.bvo.nick_name =='작심삼일'}">
						<font color="#99B573" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='좀 모자란'||requestScope.brlist.bvo.nick_name =='돼지'||requestScope.brlist.bvo.nick_name =='헤비스모커'||requestScope.brlist.bvo.nick_name =='평생 로또나 살'||requestScope.brlist.bvo.nick_name =='방해만 되는'}">
						<font color="#C69C6D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='기술 배워라'||requestScope.brlist.bvo.nick_name =='몬스터'||requestScope.brlist.bvo.nick_name =='예비 폐암환자'||requestScope.brlist.bvo.nick_name =='신용불량자'||requestScope.brlist.bvo.nick_name =='이 어플 왜 쓸까'}">
						<font color="#758C9D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='아메바'||requestScope.brlist.bvo.nick_name =='평생 그렇게 살'||requestScope.brlist.bvo.nick_name =='오늘내일할'||requestScope.brlist.bvo.nick_name =='수드라'||requestScope.brlist.bvo.nick_name =='패가망신할'}">	
						<font color="#42452B" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='루저'||requestScope.brlist.bvo.nick_name =='산소소모기'||requestScope.brlist.bvo.nick_name =='故'||requestScope.brlist.bvo.nick_name =='그지'||requestScope.brlist.bvo.nick_name =='똥 제조기'}">
						<font color="#333333" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
					<c:when test="${requestScope.brlist.bvo.nick_name =='공부관리자'||requestScope.brlist.bvo.nick_name =='운동관리자'||requestScope.brlist.bvo.nick_name =='금연관리자'||requestScope.brlist.bvo.nick_name =='재테크관리자'||requestScope.brlist.bvo.nick_name =='생활관리자'}">
						<font color="#A566FF" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="4">${requestScope.brlist.bvo.nick_name }</font>
					</c:when>
				</c:choose>
         
         <font size="2" color="#8C8C8C">${requestScope.brlist.bvo.id }</font>&nbsp;&nbsp;</p>
         	<p><font size="1" color="#8C8C8C">작성시간: ${requestScope.brlist.bvo.time_posted }&nbsp;&nbsp;Hits: ${requestScope.brlist.bvo.hits } 인증수: ${requestScope.brlist.bvo.confirmation }</font></p>
         <hr>
         <p>${requestScope.brlist.bvo.content }</p>
         <c:choose>
         <c:when test="${requestScope.brlist.bvo.savefilename!='default.png'}">
          <p><center><img src="uploadFileForBoard/${requestScope.brlist.bvo.savefilename }" width="85%"></center></p>
         </c:when>
         </c:choose>

         <!-- 가입한 그룹의 글이 아닐경우 댓글 못달게 하고 인증해주는 걸 위한 부분.... -->
         	<c:forEach items="${sessionScope.login.list }" var="gvo">
        	<c:choose>
        		<c:when test="${gvo.group_id==requestScope.brlist.bvo.group_id}">
	         	<form id="regReplyForm" action="registerReply.nu">
	         	<c:if test="${sessionScope.login.id!=requestScope.brlist.bvo.id }">
					<c:choose>
					<c:when test="${fn:contains(confirmedIdList, sessionMemberId)}"></c:when>
					<c:otherwise>
						<%-- <p><a href="confirm.nu?writer=${requestScope.brlist.bvo.id }&id=${sessionScope.login.id}&no=${requestScope.brlist.bvo.no}&category=${requestScope.brlist.bvo.category }" data-role="button">인증 하기</a></p> --%>
						<a href="confirm.nu?writer=${requestScope.brlist.bvo.id }&id=${sessionScope.login.id}&no=${requestScope.brlist.bvo.no}&category=${requestScope.brlist.bvo.category }">
						<button style="width: 30px"><img src="./img/con_button.png" height="60" ></button>
		 				</a>
					</c:otherwise>
					</c:choose>
				</c:if>
				<hr>
				<div>
				<%-- <p><font size="2">${sessionScope.login.id}님의 댓글</font></p> --%>
					<input type="text" id="replyContent" name="content" placeholder="댓글을 입력해주세요"></div>
				<input type="hidden" name="id" value="${sessionScope.login.id}">
				<input type="hidden" name="no" id="boardNoForReply" value="${requestScope.brlist.bvo.no}">
						<c:choose>
							<c:when test="${requestScope.brlist.bvo.category=='study'}">
								<input type="hidden" name="nick_name"
									value="${sessionScope.login.study_nick }">
							</c:when>
							<c:when test="${requestScope.brlist.bvo.category=='sports' }">
								<input type="hidden" name="nick_name"
									value="${sessionScope.login.sports_nick }">
							</c:when>
							<c:when test="${requestScope.brlist.bvo.category=='smoking' }">
								<input type="hidden" name="nick_name"
									value="${sessionScope.login.smoking_nick }">
							</c:when>
							<c:when test="${requestScope.brlist.bvo.category=='finance' }">
								<input type="hidden" name="nick_name"
									value="${sessionScope.login.finance_nick }">
							</c:when>
							<c:when test="${requestScope.brlist.bvo.category=='living' }">
								<input type="hidden" name="nick_name"
									value="${sessionScope.login.living_nick }">
							</c:when>
						</c:choose>
						<button><input type="image" id="regReplyBtn" src="./././img/reply_font.png" height="20"></button>
						<!-- <input type="submit" id="regReplyBtn" value="댓글 달기"> -->
				</form>
				</c:when><c:otherwise></c:otherwise>
        	</c:choose>
        </c:forEach>
		
		<c:forEach items="${requestScope.brlist.rvoList }" var="reList">
			<div>
				<p>
					<c:choose>
					<c:when test="${reList.nick_name =='공부의 신'||reList.nick_name =='만수무강'||reList.nick_name =='금연종결자'||reList.nick_name =='돈으로 똥 닦는'||reList.nick_name =='인간문화재'}">
						<font color="#FF1F27" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='엘리트'||reList.nick_name =='병원 킬러'||reList.nick_name =='담배를 물리친'||reList.nick_name =='부르주아'||reList.nick_name =='손발이 닳아 없어진 이병'}">
						<font color="#30D9E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='전교 1등'||reList.nick_name =='몸짱'||reList.nick_name =='존경스러운 금연자'||reList.nick_name =='졸부'||reList.nick_name =='혼자서도 잘해요'}">
						<font color="#A3FF00" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='3등급'||reList.nick_name =='건강한'||reList.nick_name =='자랑스러운 금연자'||reList.nick_name =='근검절약하는'||reList.nick_name =='부지런한'}">
						<font color="#FCEE5C" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='초심자'}">
						<font color="#E6E6E6" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='노력해야할'||reList.nick_name =='느림보'||reList.nick_name =='더 줄여야할'||reList.nick_name =='하층민'||reList.nick_name =='작심삼일'}">
						<font color="#99B573" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='좀 모자란'||reList.nick_name =='돼지'||reList.nick_name =='헤비스모커'||reList.nick_name =='평생 로또나 살'||reList.nick_name =='방해만 되는'}">
						<font color="#C69C6D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='기술 배워라'||reList.nick_name =='몬스터'||reList.nick_name =='예비 폐암환자'||reList.nick_name =='신용불량자'||reList.nick_name =='이 어플 왜 쓸까'}">
						<font color="#758C9D" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='아메바'||reList.nick_name =='평생 그렇게 살'||reList.nick_name =='오늘내일할'||reList.nick_name =='수드라'||reList.nick_name =='패가망신할'}">	
						<font color="#42452B" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='루저'||reList.nick_name =='산소소모기'||reList.nick_name =='故'||reList.nick_name =='그지'||reList.nick_name =='똥 제조기'}">
						<font color="#333333" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="3">${reList.nick_name }</font>
					</c:when>
					<c:when test="${reList.nick_name =='공부관리자'||reList.nick_name =='운동관리자'||reList.nick_name =='금연관리자'||reList.nick_name =='재테크관리자'||reList.nick_name =='생활관리자'}">
						<font color="#A566FF" style="text-shadow: 0.1em 0.1em 0.15em #333;" size="4">${reList.nick_name }</font>
					</c:when>
				</c:choose>
				
				
				<font size="2" color="#8C8C8C">${reList.id}&nbsp;</font><font font size="1" color="#BDBDBD">${reList.time_posted} No.${reList.re_no}</font></p>
				<p><font font size="2" color="#8C8C8C">${reList.content}</font><hr></p>
			</div>
			<%-- <tr><td>${reList.nick_name} ${reList.id}</td><td>${reList.content}</td><td>${reList.time_posted}</td><td >${reList.re_no}</td></tr> --%>
		</c:forEach>

      </div>
    <footer data-role="footer" data-position="fixed">
      <p>
      <center><img src="././img/footer.png" height="15"></center>
      </p>
    </footer>
  </section>
</body>
